There is a need at the present time for a unitary panel mountable device that will provide an electrical digital output indicative of the mechanical rotation of a shaft. Known unitary panel mountable devices, such as potentiometers, are small in size and low in cost but suffer from the disadvantages that they provide an analogue output that is not directly compatible with the signal levels required in modern electronic circuitry and that they rely on electro-mechanical contacts with their inherent signal errors. Optical encoders are also known. Although optical encoders provide a digital output they are relatively large, are not panel mountable and are expensive in comparison with potentiometers.